home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / answers / sgi / faq / apps < prev    next >
Encoding:
Internet Message Format  |  1993-06-02  |  17.7 KB

  1. Path: senator-bedfellow.mit.edu!enterpoop.mit.edu!gatech!howland.reston.ans.net!spool.mu.edu!olivea!sgigate!odin!fido.asd.sgi.com!holodeck.csd.sgi.com!aschaffe
  2. From: aschaffe@holodeck.csd.sgi.com (Allan Schaffer)
  3. Newsgroups: comp.sys.sgi.misc,comp.sys.sgi.admin,comp.sys.sgi.apps,comp.sys.sgi.bugs,comp.sys.sgi.graphics,comp.sys.sgi.hardware,comp.answers,news.answers
  4. Subject: SGI apps Frequently Asked Questions (FAQ)
  5. Supersedes: <apps_738918418@fido.asd.sgi.com>
  6. Followup-To: comp.sys.sgi.misc
  7. Date: 2 Jun 1993 06:37:55 GMT
  8. Organization: Silicon Graphics, Inc., Mountain View, CA
  9. Lines: 423
  10. Approved: news-answers-request@MIT.Edu
  11. Expires: 1 Jul 1993 06:37:47 GMT
  12. Message-ID: <apps_739003067@fido.asd.sgi.com>
  13. References: <misc_739003067@fido.asd.sgi.com>
  14. Reply-To: sgi-faq@archone.tamu.edu
  15. NNTP-Posting-Host: holodeck.csd.sgi.com
  16. Originator: aschaffe@holodeck.csd.sgi.com
  17. Xref: senator-bedfellow.mit.edu comp.sys.sgi.misc:2637 comp.sys.sgi.admin:1756 comp.sys.sgi.apps:775 comp.sys.sgi.bugs:932 comp.sys.sgi.graphics:1185 comp.sys.sgi.hardware:1432 comp.answers:862 news.answers:8992
  18.  
  19.  
  20. Archive-name: sgi/faq/apps
  21.  
  22.            SGI apps Frequently Asked Questions (FAQ)
  23.  
  24.  
  25. This information is freely distributable and wide circulation is encouraged.
  26. The contents are accurate as far as we know, but the usual disclaimers apply.
  27. This FAQ contains errors! Finding them is an exercise for alert readers.
  28.  
  29. Please send additions and changes to sgi-faq@archone.tamu.edu.
  30.  
  31. This FAQ is one of the SGI FAQ series, which consists of:
  32.  
  33.      SGI Admin FAQ - IRIX System Administration
  34.      SGI Apps FAQ - Applications & Compilers
  35.      SGI Graphics FAQ - Graphics & Windowing
  36.      SGI Hardware FAQ - Hardware issues
  37.      SGI Misc FAQ - Introduction & Miscellaneous Information
  38.  
  39. Each FAQ is posted to each comp.sys.sgi.* group as well as the news.answers
  40. and comp.answers newsgroups (whose purpose is to store FAQs) every two weeks.
  41. If you can't find one of the FAQs with your news program, you can get it by
  42. anonymous FTP from one of these sites:
  43.  
  44.  rtfm.mit.edu:pub/usenet/news.answers/sgi/faq/apps
  45.  rtfm.mit.edu:pub/usenet/comp.sys.sgi.misc/SGI_apps_Frequently_Asked_Questions
  46.  archone.tamu.edu:ftp/pub/sgi/faq/apps
  47.  rtfm.mit.edu:pub/usenet/comp.answers/sgi/faq/apps
  48.  
  49. Note that rtfm.mit.edu is home to many other FAQs and informational documents,
  50. and is a good place to look if you can't find an answer here.
  51.  
  52. Topics covered in this FAQ:
  53. --------------------------
  54.   -1- How can I quickly find the question I want in this FAQ?
  55.   -2- What's a good graphic text editor for SGIs?
  56.   -3- What about Explorer?
  57.   -4- How can I make the 'install' program work like BSD 'install'?
  58.   -5- How can I preview PostScript without buying DPS?
  59.   -6- With what applications can I edit PostScript files?
  60.   -7- How can I format unformatted manpages without buying DWB?
  61.   -8- Why can't I compile application X?
  62.   -9- Why does GNU Emacs not compile, or compile but not run?
  63.   -10- Why doesn't Xarchie 1.3 work?
  64.   -11- What do I need to do to build gcc/g++?
  65.   -12- Can I use dynamic shared libraries in IRIX?
  66.   -13- How can I make Fortran load entirely from a library?
  67.   -14- How can I make my 4.0.x Fortran program read binary data files 
  68.        written by a 3.3.x Fortran program?
  69.   -15- Credits
  70.  
  71. ----------------------------------------------------------------------
  72.  
  73. Subject:   -1- How can I quickly find the question I want in this FAQ?
  74. Date: 27 May 93 00:00:01 EST
  75.  
  76. - This FAQ follows the RFC1153 recommendations for message digests and thus
  77.   can be viewed easily with newsreaders that understand message digests.
  78. - Each question has a Subject: line, so you can easily step through the answers
  79.   with rn's ^G command.
  80. - Each question is marked with a "dash number dash" so that you can find any
  81.   answer with a simple search pattern.
  82. - Questions marked with a '+' are new this posting; those marked with a '!'
  83.   have significant new content since the last edition.
  84.  
  85. ------------------------------
  86.  
  87.  
  88. Subject:   -2- What's a good graphic text editor for SGIs?
  89. Date: 07 May 93 00:00:01 EST
  90.  
  91. The most popular graphic text editors on SGIs include:
  92.  
  93. zip (by Tom Davis of SGI) is something like jot but is orders of magnitude
  94. faster and laden with nifty features. Its only disadvantage is that it doesn't
  95. run on X-terminals, or of course text terminals. FTP to ftp.sgi.com and look 
  96. in in graphics/zip.
  97.  
  98. GNU Emacs, a perennial favorite, isn't just an editor; it's a way of life.  It
  99. has a X-windows mode and will work on X-windows terminals as well as SGI
  100. consoles and text terminals.  Emacs may be FTPed from any GNU archive.
  101.  
  102. Epoch is a derivative of GNU Emacs with better graphics support. It may be
  103. found at cs.uiuc.edu in pub/epoch-files/epoch.
  104.  
  105. ------------------------------
  106.  
  107. Subject:   -3- What about Explorer?
  108. Date: 07 May 93 00:00:01 EST
  109.  
  110. The IRIS Explorer data visualization system has its own newsgroup,
  111. comp.graphics.explorer. There is an FAQ, which can be found, along with many
  112. other Explorer goodies, at swedishchef.lerc.nasa.gov in the explorer directory.
  113.  
  114. ------------------------------
  115.  
  116. Subject:   -4- How can I make the 'install' program work like BSD 'install'?
  117. Date: 07 May 93 00:00:01 EST
  118.  
  119. The BSD and System V versions of the 'install' command are incompatible; the
  120. BSD version is most often used by Makefiles. IRIX provides both the System V
  121. version (/etc/install) and the BSD version (/usr/bin/X11/bsdinst.sh). SGI's
  122. 'imake' defines INSTALL as /usr/bin/X11/bsdinst.sh, and the Install* rules
  123. use that definition, so Imakefile-generated Makefiles will use the BSD version.
  124.  
  125. ------------------------------
  126.  
  127. Subject:   -5- How can I preview PostScript without buying DPS?
  128. Date: 07 May 93 00:00:01 EST
  129.  
  130. SGI offers a PostScript previewer as part of the extra-cost Display PostScript
  131. (DPS) option. Happily, Robert Keller of SGI <rck@fangio.asd.sgi.com> has made
  132. available GNU's GhostScript previewer, compiled *and* in SGI 'inst'
  133. installable form. FTP it from ftp.sgi.com in sgi/ghost.
  134.  
  135. ------------------------------
  136.  
  137. Subject:   -6- With what applications can I edit PostScript files?
  138. Date: 07 May 93 00:00:01 EST
  139.  
  140. Ivan Bach <ib@sgi.com> collected some testimonials from a number of SGIers:
  141.  
  142. - Adobe Illustrator and Corel Draw can edit PS files of type AI (a simplified
  143.   version of PS that facilitates editing).
  144. - If you have DPS extensions on your server and a DPS compile time
  145.   environment you can do this quite well with xfig. Check out the version on
  146.   crocus.medicine.rochester.edu.
  147. - The InterViews tool `idraw' allows manipluation of EPS (Encapulated
  148.   PostScript) files, and has a `mac-type' interface.
  149. - Island Draw 3.0 has an option to import Postscript, and it seems to accept
  150.   arbitrary Postscript.  I have fed it single page Postcript files from
  151.   Illustrator, Corel, Ventura, Designer, Eroff, and hand-coded files, and it
  152.   made Island Draw objects out of them.  The file initially opens as one
  153.   grouped object, but if you ungroup, you get editible objects.  I was quite
  154.   impressed.  I don't doubt there are ways to fool the interpreter, but it
  155.   works for output from drawing and publishing packages, which is what I need
  156.   it for.
  157.  
  158. ------------------------------
  159.  
  160. Subject:   -7- How can I format unformatted manpages without buying DWB?
  161. Date: 07 May 93 00:00:01 EST
  162.  
  163. SGI provides manpages in formatted form, and does not therefore need to provide
  164. us all with the formatting software. Most FTPable software, however, comes with
  165. unformatted manpages.
  166.  
  167. Manpages are most often formatted with Documenter's Workbench (DWB), which SGI
  168. has had to license separately from USL and we have to buy separately from SGI.
  169. SGI's DWB is based on version 2.1; the current version from USL is 3.3. Public
  170. domain alternatives include 'groff' and 'awf'.
  171.  
  172. 'groff' is by the Free Software Foundation and can be had from any GNU
  173. archive.  Compilers beware: it must be compiled with g++ (or another C++
  174. compiler?). However, there are compiled binaries on cb-iris.stanford.edu.
  175. David Hinds <dhinds@allegro.stanford.edu> gives this advice for installing
  176. groff so that it can format manpages on the fly:
  177.  
  178. Create a script called 'eqn':
  179.  
  180.  > #!/bin/sh
  181.  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
  182.  > geqn $*
  183.  
  184. and a script called 'neqn':
  185.  
  186.  > #!/bin/sh
  187.  > if [ ${1:-""} = /usr/pub/eqnchar ] ; then shift ; fi
  188.  > geqn -Tascii $*
  189.  
  190. and do:
  191.  
  192.  > ln -s gnroff nroff
  193.  
  194. and edit the end of the gnroff script to be:
  195.  
  196.  > rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
  197.  > exec groff -Wall -mtty-char $T $opts $rest
  198.  
  199. To get PostScript output from 'man -t', you also need to create a 'psroff'
  200. script similar to 'nroff'.  Here are the context diffs:
  201.  
  202. *** /usr/local/bin/nroff        Sat Feb 13 15:51:09 1993
  203. --- /usr/local/bin/psroff       Sat Feb 13 17:45:46 1993
  204. ***************
  205. *** 1,8 ****
  206.   #!/bin/sh
  207. ! # Emulate nroff with groff.
  208.  
  209.   prog="$0"
  210. ! T=-Tascii
  211.   opts=
  212.  
  213.   for i
  214. --- 1,8 ----
  215.   #!/bin/sh
  216. ! # Emulate psroff with groff.
  217.  
  218.   prog="$0"
  219. ! T=-Tps
  220.   opts=
  221.  
  222.   for i
  223. ***************
  224. *** 25,30 ****
  225. --- 25,33 ----
  226.         -Tascii|-Tlatin1)
  227.                 T=$1
  228.                 ;;
  229. +       -t)
  230. +               # ignore -- default is send to stdout
  231. +               ;;
  232.         -T*)
  233.                 # ignore other devices
  234.                 ;;
  235. ***************
  236. *** 49,53 ****
  237.   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
  238.  
  239.   # This shell script is intended for use with man, so warnings are
  240.   # probably not wanted.  Also load nroff-style character definitions.
  241. ! exec groff -Wall -mtty-char $T $opts $rest
  242. --- 52,56 ----
  243.   rest=`echo ${1+"$@"} | sed -e 's+/usr/lib/tmac+/usr/local/lib/groff/tmac+'`
  244.  
  245.   # This shell script is intended for use with man, so warnings are
  246. ! # probably not wanted.
  247. ! exec groff -Wall $T $opts $rest
  248.  
  249. The binaries on cb-iris.stanford.edu have these changes already made.
  250.  
  251. Henry Spencer's awf ("Amazingly Workable Formatter") is written in 'awk',
  252. which we all have, and does a pretty good job, considering. It can be FTPed
  253. from fresnel.stanford.edu in pub/4D.
  254.  
  255. ------------------------------
  256.  
  257. Subject:   -8- Why can't I compile application X?
  258. Date: 07 May 93 00:00:01 EST
  259.  
  260. Plenty of reasons, but here's the most common: SGI's C compiler is ANSI C
  261. by default in IRIX 4.0.x. Use the '-cckr' option to compile K&R C. You can
  262. do this most easily by setting the environment variable SGI_CC to "-cckr"
  263. or by editing the application's Makefile, often by adding "-cckr" to the
  264. CFLAGS variable.
  265.  
  266. A related problem is that Makefiles generated by 'imake' most often use 'cc
  267. -cckr -prototypes'; missing or incorrect prototypes usually just generate
  268. pages of warnings but may cause an unrecoverable error. This can often be
  269. worked around by removing "-prototypes" from the line where it appears in 
  270. the Makefile (not the Imakefile).
  271.  
  272. The cc(1) manpage describes these and related options.
  273.  
  274. ------------------------------
  275.  
  276. Subject:   -9- Why does GNU Emacs not compile, or compile but not run?
  277. Date: 07 May 93 00:00:01 EST
  278.  
  279. Emacs 18.59 is the most recent release of Emacs version 18, and builds and
  280. runs correctly under IRIX 4.0.x. Earlier versions failed to compile (because
  281. cc now needs -cckr for K&R C compatibility) or failed to run when stripped
  282. (because of object file format changes). Versions of Epoch and/or Lucid Emacs
  283. derived from GNU Emacs 18.xx may need unexmips.c from the 18.59 distribution.
  284.  
  285. Emacs 19.10 is the most recent release of Emacs version 19, and the first to
  286. build and run conveniently under 4.0.x. Earlier versions require fiddling.
  287.  
  288. Karsten Kuenne <kuenne@desy.de> has patched Emacs 18.59 to work with IRIX
  289. 5.0's new object file format. The patches are at ftp.desy.de in
  290. pub/gnu/emacs/emacs-irix5.0-patches. Emacs version 19 is not yet known to 
  291. work under IRIX 5.0.
  292.  
  293. ------------------------------
  294.  
  295. Subject:   -10- Why doesn't Xarchie 1.3 work?
  296. Date: 07 May 93 00:00:01 EST
  297.  
  298. The app-defaults file supplied with Xarchie 1.3 used fonts which did not exist
  299. on some versions of IRIX, resulting in invisible text and sometimes program
  300. lockups. You can either replace the "fixed" and "fixed*bold" fonts with
  301. "screen13" and "screen-bold13" everywhere they appear in the Xarchie.ad file,
  302. or better yet upgrade to Xarchie 2.0, in which this problem has been fixed.
  303. The current version of Xarchie can be found on export.lcs.mit.edu in the
  304. contrib directory.
  305.  
  306. ------------------------------
  307.  
  308. Subject:   -11- What do I need to do to build gcc/g++?
  309. Date: 07 May 93 00:00:01 EST
  310.  
  311. Before you start, remember that you need the headers and runtime libraries
  312. from SGI's extra-cost development option both to compile and use gcc. (gas and
  313. glibc do not yet work on SGIs.) Of course if you buy the development option
  314. you'll get SGI's compiler anyway; this is comp.sys.sgi.*'s most popular
  315. Catch-22. Don't forget to install the dev.cmplrs_hdr.internal subsystem, which
  316. contains needed headers and is not installed by default.
  317.  
  318. Nico Garcia-Otero <harvard.harvard.edu!eplunix!raoul> writes:
  319. gcc/g++ is /pub/gnu/gcc-2.3.3.tar.z on aeneas.mit.edu. libg++ is
  320. /pub/gnu/libg++-2.3.tar.z on the same machine. (These are not "pack"ed, they
  321. are "gzip"ed. Gzip is a public domain compression system, faster and more
  322. portable than compress or pack. It's available as /pub/gnu/gzip-1.0.7.tar on
  323. the same machine, and should be installed first.)
  324.  
  325. Make sure you have both a C compiler and write permissions on a /usr/local
  326. directory to install the these programs, untar and install gzip, then
  327. gcc-2.3.3, then libg++-2.3.  The configure scripts on all of these are
  328. reasonably clever and very effective: set them for mips-sgi-irix4 for the
  329. Irix 4.x.x OS.
  330.  
  331. There *is* a bug in gcc-2.3.3 when bootstrapping with the cc from the Irix
  332. 4.0.5 OS:  specifically, cp-lex.c should *not* be compiled with -O. Using -O
  333. causes g++ to break, and libg++ will fail to compile when it runs its
  334. utils/gen-params script to test the g++ compiler. I've been told this is a
  335. problem with the Version 3 SGI compiler, not the Version 2.10 SGI compiler.
  336. I don't know if that is true, or on which SGI OS's it is true, but the
  337. fix worked fine for me.
  338.  
  339. There are no other *fatal* flaws, but there are some tune-ups to the
  340. installation process available. For example, the bootstrap installation
  341. requires about 80 Meg of disk. Pruning at intermediate stages can prevent it
  342. from taking more than about 50 Meg, at the cost of losing intermediate steps
  343. to double check your results with.
  344.  
  345. The installation of gcc and libg++ require about 20 Meg free in /usr/local:
  346. keep this in mind.
  347.  
  348. Reading the man pages will require either a licensed copy of nroff, or the
  349. installation of groff, available as /pub/gnu/groff-1.08.tar.z on
  350. aeneas.mit.edu. There are additional changes in the shell scripts created to
  351. make it handle the SGI man formatting correctly: I don't know the details,
  352. but they've been discussed on the sgi news groups.
  353.  
  354. Curtis Bingham <bingh@chopin.cs.byu.edu> adds some specifics for gcc:  Unless
  355. you're sure you're starting from a fresh distribution, do a 'make distclean'
  356. at the gcc-2.3.3 top level directory.  Then type 'configure mips-sgi-irix4'
  357. (Assuming you have at least Irix 4.0).  Type 'make LANGUAGES=C' + whatever the
  358. INSTALL file instructs you to do for the first run.  When that finishes, type
  359. 'make stage1'.   Before continuing with the instructions in the INSTALL file,
  360. you must compile cp-lex.o without optimizations.  To do this, type something
  361. along these lines(see the INSTALL file for exact details): 'make
  362. "CC=stage1/gcc" "CFLAGS=-g" cp-lex.o' Notice there is not a -O in this, as
  363. there is in the INSTALL file.  Once cp-lex.o compiles, you can type 'make
  364. "CC=stage1/blahblah" "CFLAGS=-g -O"' as directed in the INSTALL file.  This
  365. step needs to be repeated if you decide to make the stage2 compiler.
  366.  
  367. All of the above applies to IRIX 4.0.x; gcc is not knownn to deal with 5.x.
  368. gcc 2.4.0 does not yet work under any version of IRIX.
  369.  
  370. ------------------------------
  371.  
  372. Subject:   -12- Can I use dynamic shared libraries in IRIX?
  373. Date: 07 May 93 00:00:01 EST
  374.  
  375. IRIX 5.0 supports SVR4-style dynamic shared libraries. IRIX 4.0.x does not,
  376. but Jack Jansen <jack@cwi.nl> has written a package to do it anyway. Get the
  377. file pub/dl-1.3.tar.Z from ftp.cwi.nl by anonymous FTP.
  378.  
  379. ------------------------------
  380.  
  381. Subject:   -13- How can I make Fortran load entirely from a library?
  382. Date: 07 May 93 00:00:01 EST
  383.  
  384. Bron Nelson <bron@sgi.com> writes:
  385. > Is there any way to tell f77 to load entirely from a library? When using ld
  386. > for C, it is possible to use -u symname to force the loader to start its
  387. > work. This makes it possible to load entirely from a library.
  388.  
  389. The same trick works for Fortran, but (like all things Fortranish) you have to
  390. do a little dance to make things work out.
  391.  
  392. The trouble is that the Fortran compiler has an "-u" option, so you have to
  393. arrange to pass the "-u symname" option directly to the loader, by-passing the
  394. Fortran front end.
  395.  
  396. Try adding the incantation "-Wl,-u,MAIN__" to the link line.  e.g.:
  397.  
  398.     f77 -Wl,-u,MAIN__ -o myprog myprog.a
  399.  
  400. The "-W" option is described in the man page.
  401.  
  402. ------------------------------
  403.  
  404. Subject:   -14- How can I make my 4.0.x Fortran program read binary data files 
  405.                 written by a 3.3.x Fortran program?
  406. Date: 07 May 93 00:00:01 EST
  407.  
  408. You must compile your program with the -old_rl flag (described in the f77
  409. manpage) _and_ open the file with the option "form='unformatted'", for example:
  410.  
  411. open(1, file='filename', access='direct', recl=1, form='unformatted')
  412.  
  413. ------------------------------
  414.  
  415. Subject:   -15- Credits
  416. Date: 6 May 93 00:00:01 EST
  417.  
  418. The comp.sys.sgi FAQs are the collective effort of
  419.  
  420.   Dale Chayes        dale@ldeo.columbia.edu
  421.   Steve Rikli        steve@archone.tamu.edu
  422.   Allan Schaffer    aschaffe@sgi.com
  423.   Dave Schweisguth    dcs@neutron.chem.yale.edu
  424.  
  425. Special thanks are due to
  426.  
  427.   Tom Davis        Author of 'zip'
  428.   Harry Mangalam    Maintainer of the comp.sys.sgi.* WAIS database
  429.  
  430. Finally, much thanks to all of the SGI employees on Usenet, all of whom have
  431. provided gigabytes of help and information.
  432.  
  433. Credits for individual contributions are given in the answers.
  434.  
  435. ------------------------------
  436. -- 
  437. Allan Schaffer
  438. aschaffe@sgi.com
  439. -- 
  440. Allan Schaffer
  441. aschaffe@sgi.com
  442.